# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataproc.V1.Model.ConsolidatedExecutorSummary do
  @moduledoc """
  Consolidated summary about executors used by the application.

  ## Attributes

  *   `activeTasks` (*type:* `integer()`, *default:* `nil`) - 
  *   `completedTasks` (*type:* `integer()`, *default:* `nil`) - 
  *   `count` (*type:* `integer()`, *default:* `nil`) - 
  *   `diskUsed` (*type:* `String.t`, *default:* `nil`) - 
  *   `failedTasks` (*type:* `integer()`, *default:* `nil`) - 
  *   `isExcluded` (*type:* `integer()`, *default:* `nil`) - 
  *   `maxMemory` (*type:* `String.t`, *default:* `nil`) - 
  *   `memoryMetrics` (*type:* `GoogleApi.Dataproc.V1.Model.MemoryMetrics.t`, *default:* `nil`) - 
  *   `memoryUsed` (*type:* `String.t`, *default:* `nil`) - 
  *   `rddBlocks` (*type:* `integer()`, *default:* `nil`) - 
  *   `totalCores` (*type:* `integer()`, *default:* `nil`) - 
  *   `totalDurationMillis` (*type:* `String.t`, *default:* `nil`) - 
  *   `totalGcTimeMillis` (*type:* `String.t`, *default:* `nil`) - 
  *   `totalInputBytes` (*type:* `String.t`, *default:* `nil`) - 
  *   `totalShuffleRead` (*type:* `String.t`, *default:* `nil`) - 
  *   `totalShuffleWrite` (*type:* `String.t`, *default:* `nil`) - 
  *   `totalTasks` (*type:* `integer()`, *default:* `nil`) - 
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :activeTasks => integer() | nil,
          :completedTasks => integer() | nil,
          :count => integer() | nil,
          :diskUsed => String.t() | nil,
          :failedTasks => integer() | nil,
          :isExcluded => integer() | nil,
          :maxMemory => String.t() | nil,
          :memoryMetrics => GoogleApi.Dataproc.V1.Model.MemoryMetrics.t() | nil,
          :memoryUsed => String.t() | nil,
          :rddBlocks => integer() | nil,
          :totalCores => integer() | nil,
          :totalDurationMillis => String.t() | nil,
          :totalGcTimeMillis => String.t() | nil,
          :totalInputBytes => String.t() | nil,
          :totalShuffleRead => String.t() | nil,
          :totalShuffleWrite => String.t() | nil,
          :totalTasks => integer() | nil
        }

  field(:activeTasks)
  field(:completedTasks)
  field(:count)
  field(:diskUsed)
  field(:failedTasks)
  field(:isExcluded)
  field(:maxMemory)
  field(:memoryMetrics, as: GoogleApi.Dataproc.V1.Model.MemoryMetrics)
  field(:memoryUsed)
  field(:rddBlocks)
  field(:totalCores)
  field(:totalDurationMillis)
  field(:totalGcTimeMillis)
  field(:totalInputBytes)
  field(:totalShuffleRead)
  field(:totalShuffleWrite)
  field(:totalTasks)
end

defimpl Poison.Decoder, for: GoogleApi.Dataproc.V1.Model.ConsolidatedExecutorSummary do
  def decode(value, options) do
    GoogleApi.Dataproc.V1.Model.ConsolidatedExecutorSummary.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataproc.V1.Model.ConsolidatedExecutorSummary do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
